package ink.xiaobaibai.autoConfig;

import ink.xiaobaibai.autoConfig.role.RoleItem;
import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.context.annotation.PropertySource;
import org.springframework.stereotype.Component;

import java.util.List;

/**
 * @description: 读取配置文件
 * @author: 小白白
 * @create: 2021-05-19
 **/

@Component
@ConfigurationProperties(prefix = "oxygen.auto")
@PropertySource(value = "classpath:config/application.yml")
public class AutoConfigProperties {

    /**
     * 配置角色
     */
    private List<RoleItem> roleItemList;

    private boolean init;

    public List<RoleItem> getRoleItemList() {
        return this.roleItemList;
    }

    public void setRoleItemList(List<RoleItem> roleItemList) {
        this.roleItemList = roleItemList;
    }

    public boolean isInit() {
        return this.init;
    }

    public void setInit(boolean init) {
        this.init = init;
    }

}
